# import time
#
# from appium import webdriver
# from selenium.webdriver.common.by import By
# from time import sleep
# import os
# from selenium.webdriver.support.ui import WebDriverWait
# from selenium.webdriver.support import expected_conditions as EC
#
# class TestLook():
#     def setup_method(self):
#         os.system('adb root')
#         cap = {
#           "platformName": "Android",
#           "deviceName": "emulator-5554",
#           "noReset": True,
#           "appPackage": "com.xiachufang",
#           "appActivity": "com.xiachufang.activity.home.HomeActivity"
#         }
#         self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',cap)
#         self.driver.implicitly_wait(25)
#         sleep(14)
#
#     def teardown_method(self):
#         self.driver.quit()
#
#     def test_01(self):
#         try:
#             self.driver.find_element(By.ID,'com.xiachufang:id/navigation_img_view').click()
#             sleep(2)
#             WebDriverWait(self.driver,15).until(EC.presence_of_element_located((By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.FrameLayout/android.widget.ScrollView/android.widget.LinearLayout/android.widget.TextView[3]'))).click()\
#             sleep(2)
#         except Exception as e:
#             print('报错信息',e)
#             t = time.strftime('%Y%m%d%H%M%S',time.localtime())
#             self.driver.save_screenshot(t+'wodekec.png')
